import { useEffect } from 'react'
import { getChannels } from '@/store/actions/article'
import { useDispatch , useSelector } from 'react-redux'

export const useChannels = () => {
    const channelsList = useSelector(state=>state.article)
    const dispatch = useDispatch()
    useEffect(()=>{
        dispatch(getChannels())
    }, [dispatch])
    return channelsList
}